<?php 
include(dirname(__FILE__).'/../../../includes.php5');

include_once($project_path.'/class/user/user.class.php5');
session_start();
include_once($project_path.'/class/fw/dictionary.class.php5');

userUser::checkSession();

include_once($project_path.'/class/fw/login/loginYahoo.class.php5');

list($responseOk, $userId, $usePersistentCookie) = fwLoginYahoo::processLogin($_REQUEST);
if ($responseOk)
{
	userUser::login('yahoo', $userId, $usePersistentCookie);
?>
<script>
try
{
	if(opener)
	{
		opener.login_popup.hide();
		opener.userConnectionRefreshLogin()
	}
	else
	{
		top.location.href='../../index.php5'
	}
}
catch(e)
{
}
self.close()
</script>
<?php
}
else
{
?>
<script>
try
{
	if(opener)
	{
		opener.loginError("«USER_LOGIN_YAHOO_ERROR»", '<?php echo fwConverter::text2JSString($userId)?>', true);
	}
	else
	{
		top.location.href="../../index.php5"
	}
}
catch(e)
{
}
self.close()
</script>
<?php
}
?>